﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../include/head.jspf"%>   
<title>东方易云后台管理系统</title>
<style>
body { background: #f5f5f5 ;}
</style>
<script>
function addFlowActivityTemplateSave(){
	var errorMsg = "";
	errorMsg += sl_check($("#activityName")[0], "活动名称", 255, 1);
	errorMsg += sl_check($("#prefixActivityNo")[0], "前置活动编号", 50,0);
	errorMsg += sl_checkInteger($("#activityOrder")[0], "活动顺序", 2, 1);
	errorMsg += sl_checkOption($("#actorStart")[0], "活动起点");
	errorMsg += sl_checkOption($("#actorEnd")[0], "活动终点");

	if(errorMsg != ""){
		alert(errorMsg);
		return;
	}else{
		$('#addForm').attr("action","addFlowActivityTemplateSave");
		$('#addForm').submit();
	}
}
function reset(){
	$('#activityName').val("");
	$('#actorStart').val("");
	$('#actorEnd').val("");
	$('#prefixActivityNo').val("");	
}	

function goBack(){
	var url = window.location.href;
	var pattern = new RegExp("/addFlowActivityTemplate");
	pattern.exec(url);
	window.location.href = RegExp.leftContext+"/goBackToActivityTemplate";
}
</script>
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="js/pngfix.js"></script>
<![endif]-->
</head>
<body>
<form method="post" action="addFlowTemplateNext" id="addForm">
<input type="hidden" name="pageNo" value="<c:out value="${pageNo}"/>"/>
<input type="hidden" name="flowTemplateId" id="flowTemplateId" value="<c:out value="${flowTemplateId}"/>"/>
<div id="body-wrapper">
  <!-- Wrapper for the radial gradient background -->
  <div id="main-content">
    <!-- Main Content Section with everything -->
    <!-- Page Head -->
    <div id="page-title">
      <h3>企业业务流程<c:choose><c:when  test="${isEdit==null}">新建</c:when><c:otherwise>编辑</c:otherwise></c:choose>：新建活动</h3>
    </div>
    <div class="pgline"></div>   
    <div class="clear"></div>    

    <div id="page-title">
      <h4>活动信息</h4>
    </div>
    <div class="pgline"></div>
     <div class="bulk-actions align-left">
     <a class="button2" href="javascript:void(0);" onclick="addFlowActivityTemplateSave();">保存</a> 
     <a class="button2" href="javascript:void(0);" onclick="goBack()">返回</a> 
     <a class="button2" href="javascript:void(0);" onclick="reset();">重置</a> </div>
    <div class="clear"></div>

    <div class="bulk-actions align-left"> </div>
    <div class="clear"></div>
    <div class="notification querytj png_bg">
      <div>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="13%" height="35" align="right">活动编号： </td>
            <td width="29%"><input type="text" name="activityNo" id="activityNo" class="input21" readonly="readonly" value="<c:out value="${activityNo}"/>"/></td>
            <td width="15%" align="right">活动名称： </td>
            <td width="26%"><input name="activityName" id="activityName" type="text" class="input2" value="<c:out value="${activityName}"/>"/></td>
          </tr>
          <tr>
            <td height="35" align="right">活动顺序： </td>
            <td height="35"><input name="activityOrder" id="activityOrder" type="text"  class="input21" readonly="readonly" value="<c:out value="${activityOrder}"/>"/></td>
            <td width="15%" align="right">活动起点： </td>
            <td width="26%"><select name="actorStart" id="actorStart" class="select1" >
              <option value="" selected="selected">请选择</option>
              <c:forEach items="${optionNodeMap}" var="one">
              <option value="${one.key}" <c:out value="${actorStart== one.key?'Selected':''}"></c:out>><c:out value="${one.value}"/></option>
              </c:forEach>
            </select></td>
          </tr>
          <tr>
            <td height="35" align="right">活动终点：</td>
            <td height="35"><select name="actorEnd" id="actorEnd" class="select1" >
              <option value="" selected="selected">请选择</option>
              <c:forEach items="${optionNodeMap}" var="one">
              <option value="${one.key}" <c:out value="${actorEnd== one.key?'Selected':''}"></c:out>><c:out value="${one.value}"/></option>
              </c:forEach>
              </select></td>
            <td height="35" align="right">前置活动编号：</td>
            <td height="35"><input name="prefixActivityNo" id="prefixActivityNo" type="text"  class="input2" value="<c:out value="${prefixActivityNo}"/>"/></td>
          </tr>
        </table>
      </div>
    </div>
      
  </div>
  <!-- End #main-content -->
</div>


</form>
</body>
</html>
